<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="extLibs" value="validate"/>
<sys:header title="考核打分管理 - ${score.isNewRecord ? '新增' : '编辑'}考核打分" extLibs="${extLibs}" htmlClass="scroll"/>
<div class="portlet box ${boxStyleColor} autoHeight">
	<div class="portlet-body form">
		<form:form id="inputForm" modelAttribute="score" action="${ctx}/eva/score/save" method="post" class="form-horizontal">
			<div class="table-fdiv">
				<h3>${score.isNewRecord ? '新增' : '编辑'}考核打分</h3>
				<table class="table-form">
					<tr class="table-caption"><td colspan="4">基本信息</td></tr>
					<tr class="hide"><td><form:hidden path="id"/><td></tr>
					<tr>
						<td class="lbl" width="130">当前年度：</td>
						<td>
							<form:input path="currentYear" htmlEscape="false" maxlength="4" class="form-control"/>
						</td>
						<td class="lbl" width="130">office_code：</td>
						<td>
							<sys:treeselect id="office" name="office.officeCode" value="${score.office.officeCode}" labelName="office.officeName" labelValue="${score.office.officeName}"
								title="部门" url="/sys/office/treeData?type=2" cssClass="" allowClear="true" notAllowSelectParent="true"/>
						</td>
					</tr>
					<tr>
						<td class="lbl" width="130">office_name：</td>
						<td>
							<form:input path="officeName" htmlEscape="false" maxlength="64" class="form-control"/>
						</td>
						<td class="lbl" width="130">指标编码：</td>
						<td>
							<form:input path="targetCode" htmlEscape="false" maxlength="64" class="form-control"/>
						</td>
					</tr>
					<tr>
						<td class="lbl" width="130">指标名称：</td>
						<td>
							<form:input path="targetName" htmlEscape="false" maxlength="255" class="form-control"/>
						</td>
						<td class="lbl" width="130">自评得分：</td>
						<td>
							<form:input path="selfScore" htmlEscape="false" class="form-control number"/>
						</td>
					</tr>
					<tr>
						<td class="lbl" width="130">考核得分：</td>
						<td>
							<form:input path="checkScore" htmlEscape="false" class="form-control number"/>
						</td>
						<td class="lbl" width="130">备注信息：</td>
						<td>
							<form:input path="remrks" htmlEscape="false" maxlength="255" class="form-control"/>
						</td>
					</tr>
				</table>
				<div class="form-actions">
					<shiro:hasPermission name="eva:score:edit">
						<button id="btnSubmit" type="submit" class="btn btn-primary"><i class="fa fa-check"></i> 保 存</button>&nbsp;
					</shiro:hasPermission>
					<button id="btnCancel" type="button" class="btn default" onclick="closeCurrentTabPage('${param.parentTabPageId}')"><i class="fa fa-reply-all"></i> 关 闭</button>
				</div>
			</div>
		</form:form>
	</div>
</div>
<sys:footer extLibs="${extLibs}"/>
<script type="text/javascript">
	$("#inputForm").validate({
		submitHandler: function(form){
			ajaxSubmitForm($(form), function(data){
				showMessage(data.message);
				if(data.result == Global.TRUE){
					closeCurrentTabPage('${param.parentTabPageId}', function(contents, contentWindow){
						contentWindow.page();
					});
				}
			}, "json");
	    }
	});
</script>